package com.start_eternity.oasissafewalk.mapper;

import java.util.Collection;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.start_eternity.oasissafewalk.pojo.Notice;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import java.util.Date;
import java.util.List;

/**
 * @author QT
 * @description 针对表【notice(通知公告表)】的数据库操作Mapper
 * @createDate 2024-01-31 19:06:29
 * @Entity com.start_eternity.oasissafewalk.pojo.Notice
 */
@MapperScan("BaseMapper")
public interface NoticeMapper extends BaseMapper<Notice> {

    //根据标题删除公告
    int delByNTitle(@Param("nTitle") String nTitle);

    //根据ID批量删除公告
    int deleteBachId(List<Integer> ids);

    //根据id查询公告
    List<Notice> queryAllByNId(@Param("nId") Integer nId);

    //全部数据查询
    List<Notice> queryAll();

    //根据标题模糊查找
    List<Notice> queryList(@Param("nTitle") String nTitle);

    //更具id修改数据
    int update(Notice notice);

    //插入数据
    int insertAll(Notice notice);

    //批量插入
    int insertBatch(@Param("noticeCollection") Collection<Notice> noticeCollection);

}




